package com.linkhub.oms.admin.modules.logistic.domain.param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Pattern;

import java.io.Serializable;

/**
 * @author Jaycle
 * @version 1.0.0
 * @description LogisticEditStatusParam
 * @date 2024/04/30日 16:33
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "LogisticEditStatusParam", description = "LogisticEditStatusParam")
public class LogisticEditStatusParam implements Serializable {

    @ApiModelProperty(value = "更改状态；0-停用；1-启用")
    @Range(min = 0, max = 1, message = "{validation.logistic.authorization.range}")
    @NotNull(message = "{validation.logistic.authorization.notNull}")
    private Integer channelState;

    @ApiModelProperty(value = "渠道编码")
    @NotBlank(message = "{validation.logistic.channelCode.notNull}")
    private String channelCode;

    @ApiModelProperty(value = "开始停用日期参数，format:yyyy-MM-dd")
    @Pattern(regexp = "\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])", message = "{validation.logistic.Date.format}")
    private String startDate;

    @ApiModelProperty(value = "结束停用日期参数，format:yyyy-MM-dd")
    @Pattern(regexp = "\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])", message = "{validation.logistic.Date.format}")
    private String endDate;
}
